#!/bin/bash

echo "execute post install script"
prefix=@CPACK_PACKAGING_INSTALL_PREFIX@

# prepare the systemd service unit
cp -f $prefix/profile/oceanbase.service /etc/systemd/system/oceanbase.service
chmod 644 /etc/systemd/system/oceanbase.service
chmod +x $prefix/profile/oceanbase-service.sh
cp -f $prefix/profile/oceanbase.cnf /etc/oceanbase.cnf
systemctl daemon-reload

# telemetry
/bin/bash $prefix/profile/telemetry.sh $1 >/dev/null 2>&1